<template>
    <div>
        <div>
            <ul v-for="item in list" :key="item.id">
                <li @click="chuancan(item)">{{ item.name }}</li>
            </ul>
        </div> 
    </div>
</template>
<script>
export default {
    data(){
        return{
            list:[
                {id:1,name:'hrw'},
                {id:2,name:'zmz'}
            ]
        }
    },
    methods:{
        chuancan(item){
            console.log(item);
            //动态路由传参两种写法
            // this.$router.push(`/MoreauParticulars/${item.name}`,()=>{})
            this.$router.push({
                name:'MoreauParticulars',
                params:{
                    can:item.name
                }
            },()=>{})
        }
    }
}
</script>
<style lang="less" scoped>

</style>